package view.rules;

import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSpinner;

import net.miginfocom.swing.MigLayout;

public class TriggerPanel extends JPanel{
	
	public JButton triggerButton;
	private JComboBox triggerCombo;
	private JCheckBox excludedCheBox;
	private JLabel excludedLabel;
	private JDialog verseDialog;
	private JPanel versePanel;
	private JButton currentVerseButton;
	private JLabel bookLabel;
	private JComboBox bookCombo;
	private JLabel chapterLabel;
	private JSpinner chapterSpin;
	private JLabel startVerseLabel;
	private JSpinner startVerseSpin;
	private JLabel endVerseLabel;
	private JSpinner endVerseSpin;
	private JCheckBox ontologyChekBox;
	private JLabel ontologyLabel;
	private JButton okButton;
	private JButton cancelButton;
	private JPanel ontologyPanel;
	
	public TriggerPanel(){
		setLayout(new MigLayout());
		initComponent();
		addComponent();
	}
	
	private void initComponent(){
		
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		
		triggerButton = new JButton("Trigger Word");
		triggerCombo = new JComboBox();
		triggerCombo.setPreferredSize(new Dimension((int)screenSize.getWidth() - 300, 20));
		excludedCheBox = new JCheckBox();
		excludedLabel = new JLabel("Excluded");
		
	}
	
	private void addComponent(){
		
		add(triggerButton);
		add(triggerCombo);
		add(excludedCheBox);
		add(excludedLabel);
		
	}

	public void setModel (DefaultComboBoxModel model){
		triggerCombo.setModel(model);
		
	}
	
	public JComboBox getComboBox(){
		return this.triggerCombo;
	}
}
